Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 3 - Printer Drivers / Writing Printer Driver Files


Using the Printing-Related Collections

Much of the data that defines how a document is processed for printing is stored in collection objects. QuickDraw GX supports three collections to store printing-related information:

These collections are described in Inside Macintosh: QuickDraw GX Printing. Collections and collection items are described in the chapter "Collection Manager" in Inside Macintosh: QuickDraw GX Environment and Utilities.

Most of the collection items with which you need to work with to develop a printer driver are found in the job collection, which is illustrated in Figure 3-2. You access the information in this collection when your driver needs to modify the choices that are presented to the user and when your driver needs to access the current settings of various printing parameters.

Figure 3-2 The job collection

Each of the job collection items shown in Figure 3-2 is described in Inside Macintosh: QuickDraw GX Printing.

You can access each item in this collection by specifying its tag ID. Using tags to access collection items is described in Inside Macintosh: QuickDraw GX Environment and Utilities. The tag ID that you use for each item is listed in Table 3-4.
Table 3-4 Tag ID constants for items in the job collection
ConstantValueExplanation
gxJobTag'job'Print-job information
gxCollationTag'sort'Collation information
gxCopiesTag'copy'Copy information
gxPageRangeTag'rang'Page-range information
gxQualityTag'qual'Quality information
gxFileDestinationTag'dest'File-destination information
gxFileLocationTag'floc'File-location information
gxFileFormatTag'ffmt'File-format information
gxFileFontsTag'incf'File-fonts information
gxPaperFeedTag'feed'Paper-feed information
gxTrayFeedTag'tray'Tray-feed information
gxManualFeedTag'manf'Manual-feed information
gxNormalMappingTag'nmap'Standard mapping information
gxSpecialMappingTag'smap'Special mapping information
gxTrayMappingTag'tmap'Tray-mapping information
gxPrintPanelTag'ppan'Print-panel information
gxFormatPanelTag'fpan'Format-panel information

Each of the items in the job collection has a specific data structure associated with it, and most have a number of constants defined for setting the values of fields in the structures. These data structures and constants are described in the chapter "Page Formatting and Dialog Box Customization" in Inside Macintosh: QuickDraw GX Printing.

WARNING
The size of the items in the job collection is subject to change as QuickDraw GX evolves. For that reason, it is important for you to specify an expected size for each item in your calls to the Collection Manager, rather than specifying nil, which tells the Collection Manager to copy the entire object no matter what its size is. The size that you specify must match the size of the data structure into which the item is being copied.
The ImageWriter II printer driver accesses several of the job collection items to determine how to proceed with printing. One example, the JobIsBest function, is shown in Listing 3-12 on page 3-38. This function accesses the quality information to determine how to send data to the printing device.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help